package com.philip.journal.core.controller;

import java.io.IOException;

import javax.servlet.ServletException;

/** Interface for all controller actions. */
public interface ControllerAction {


    /**
     * Required for Business session management.
     *
     * @param sessionId
     *            this should come from servlet container.
     */
    void setSessionId(final String sessionId);

    /**
     * Follows struts like method for the main execution method of the action class.
     *
     * @throws ServletException derived from service method of a Servlet.
     * @throws IOException derived from service method of a Servlet.
     */
    void execute() throws ServletException, IOException;

    /**
     * This will define the response provider.
     *
     * @return Response handler for service requests.
     */
    ResponseHandler getResponseHandler();

}
